<div>
<form action="/comment/add" method="post" id="comment_form">
<?php
if( (isset($aSetting['isguest']) && $aSetting['isguest']==1) ||( Yii::app()->user->id) ){
    //不需要登录
?>
<p>
<textarea name="content"></textarea></p>
<?php if( isset($aSetting['iscode']) && $aSetting['iscode']==1){ ?>
<p>
	<span class="lab"><label class="form_label" for="user_check">验证码：</label></span>
	<input  class="login-code" type="text" id="user_check" name="verifyCode"  AUTOCOMPLETE="off"/>
	<img alt="点击换图" title="点击换图" src="<?php echo $this->createUrl('captcha/index');?>" 
							onclick='this.src="/captcha/index/" + new Date().getTime();' 
							style="cursor:pointer;vertical-align:middle;border:#000000 1px solid;width:50px;height:22px;">
	</p>
<?php } ?>
<input type="hidden" name="comment_type" value="<?php echo $aParams['comment_type'] ?>" />
<input type="hidden" name="cat_id" value="<?php echo $aParams['cat_id'] ?>" />
<input type="hidden" name="content_id" value="<?php echo $aParams['content_id'] ?>" />
<input type="hidden" name="status" value="<?php echo $aParams['status'] ?>" />
<input type="submit" value=" 提交" class="submit_comment" />
<?php
} else {
?>
对不起你还没有登录，不能评论，请先登录
<?php    
}
?>
</form>
<div class="comment-wrap">
    <?php if( !empty($aCommentList['list']) ){ foreach($aCommentList['list'] as $aVal){ ?> 
    <div class="comment-list">
        <p><?php echo $aVal['content'];  ?></p>
        <p><?php echo Yii::app()->common->formattime('Y-m-d H:i:s' ,$aVal['createtime']);  ?></p>
    </div>
    <?php }} ?>
    <div class="page"><?php $this->widget('LinkPager',array('pages' => $aCommentList['pages'])); ?></div>
</div>

</div>
